using System.Collections.Generic;
using Belmost4PDA.Constants;
using Belmost4PDA.Fasade;

namespace Belmost4PDA.Logic
{
    public class CmdExit:AbstractCommand
    {
        public override void Execute(ref AbstractState currentState, ref AbstractControl TopControl,
                                     ref List<AbstractMapper> AllMappers)
        {
            if(currentState.AskToDo(this))
            {
                InterfaceDispatcher.Quit();
            }
        }

        public override CommandID GetID()
        {
            return CommandID.Exit;
        }
    }
}
